<?
/*********************************************
*获取url
* *******************************************/
function smarty_function_qishi_get_url($params, &$smarty)
{ 
extract($params);
$act = (NULL != $act) ? $act : "index"; //默认为首页连接
$typeid = (NULL != $typeid) ? $typeid : ""; //栏目ID
$listname = (NULL != $listname) ? $listname : 'list'; //默认的section名称
if ($typeid)
{
$val=url_rewrite($act,array('id0'=>"".$typeid.""));
}
else
{
$val=url_rewrite($act);
}
$smarty->assign($listname, $val);
unset($val);
}
?>